package io.gitee.chearnee.fw.web.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.io.Serial;

/**
 * @author cn
 * @version 1.0
 * @description
 * @date 2022/6/18 14:41
 */
@Getter
public class BaseEvent<T> extends ApplicationEvent {

  @Serial
  private static final long serialVersionUID = 5317819248867653174L;

  public BaseEvent(T source) {
    super(source);
  }

  @SuppressWarnings("unchecked")
  public T getData() {
    return (T) getSource();
  }
}
